{% load url from future %}
{% load value_from_settings %}

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<title>{% block title %}PCDM{% endblock %}</title>
		<link rel="stylesheet" href="pcdm_static/css/theme.css" />
		{% block head %}
		{% endblock %}
		
		{% value_from_settings "INSTALLED_MODULES" as modules %}
		{% for k, v in modules.items %}
			{% for file in v.css_files %}
				<link rel="stylesheet" href="pcdm_static/{{k}}/css/{{file}}" />
			{% endfor %}
		{% endfor %}

		{% value_from_settings "INSTALLED_MODULES" as modules %}
		{% for k, v in modules.items %}
			{% for file in v.javascript_files %}
				<script type="text/javascript" src="pcdm_static/{{k}}/js/{{file}}"></script>
			{% endfor %}
		{% endfor %}
	</head>
	<body>
		<div class="pcdm_header">
			<ul class="pcdm_nav_main">
				<li><a href = "{% url "chat.views.index.index" %}">Chat</a></li>
				{% value_from_settings "INSTALLED_MODULES" as modules %}
				{% for k, v in modules.items %}
					{% for kk, vv in v.main_views.items %}
						<li><a href = "{% url vv %}">{{kk}}</a></li>
					{% endfor %}
				{% endfor %}
			</ul>
			<ul class="pcdm_nav_subsection">{% block sectionnav %}{% endblock %}</ul>
			<br class="clearfix"/>
		</div>

	{% block content %}
	{% endblock %}

	</body>
</html>